Optimal. Leaf size=99 \[ \frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3498, 3486, 3770} \[ \frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3486
Rule 3498
Rule 3770
Rubi steps
\begin {align*} \int \sec (c+d x) (a+i a \tan (c+d x))^3 \, dx &=\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {1}{3} (5 a) \int \sec (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {1}{2} \left (5 a^2\right ) \int \sec (c+d x) (a+i a \tan (c+d x)) \, dx\\ &=\frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {1}{2} \left (5 a^3\right ) \int \sec (c+d x) \, dx\\ &=\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.62, size = 93, normalized size = 0.94 \[ \frac {a^3 (\cos (3 d x)+i \sin (3 d x)) \left (60 \tanh ^{-1}\left (\cos (c) \tan \left (\frac {d x}{2}\right )+\sin (c)\right )+i \sec ^3(c+d x) (9 i \sin (2 (c+d x))+24 \cos (2 (c+d x))+20)\right )}{12 d (\cos (d x)+i \sin (d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 202, normalized size = 2.04 \[ \frac {66 i \, a^{3} e^{\left (5 i \, d x + 5 i \, c\right )} + 80 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} + 30 i \, a^{3} e^{\left (i \, d x + i \, c\right )} + 15 \, {\left (a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 15 \, {\left (a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{6 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.14, size = 125, normalized size = 1.26 \[ \frac {15 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 15 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) - \frac {2 \, {\left (9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 48 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 22 i \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 167, normalized size = 1.69 \[ -\frac {i a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{3 d \cos \left (d x +c \right )^{3}}+\frac {i a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{3 d \cos \left (d x +c \right )}+\frac {i a^{3} \left (\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3 d}+\frac {2 i a^{3} \cos \left (d x +c \right )}{3 d}-\frac {3 a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}-\frac {3 a^{3} \sin \left (d x +c \right )}{2 d}+\frac {5 a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 i a^{3}}{d \cos \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 109, normalized size = 1.10 \[ \frac {9 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + \frac {36 i \, a^{3}}{\cos \left (d x + c\right )} + \frac {4 i \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{3}}{\cos \left (d x + c\right )^{3}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.23, size = 136, normalized size = 1.37 \[ \frac {5\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,6{}\mathrm {i}-a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,16{}\mathrm {i}-3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^3\,22{}\mathrm {i}}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - i a^{3} \left (\int i \sec {\left (c + d x \right )}\, dx + \int \left (- 3 \tan {\left (c + d x \right )} \sec {\left (c + d x \right )}\right )\, dx + \int \tan ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \left (- 3 i \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\right )\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________